<?php

namespace App\Models\Base;

// use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;

use App\Models\BaseModel;

//class Member extends BaseModel
class Member extends BaseModel implements AuthenticatableContract, JWTSubject
{
	use  Authenticatable;
	protected $table = 'bas_member';

	//相册
	public function album()
	{
		return $this->HasMany(MemberAlbum::class);
	}

	//个人信息
	public function info()
	{
		return $this->HasOne(MemberInfo::class);
	}

	//微信个人信息
	public function memberwechatinfo()
	{
		return $this->HasOne(MemberWechatInfo::class);
	}

	// jwt 需要实现的方法
	public function getJWTIdentifier()
	{
		return $this->getKey();
	}
	// jwt 需要实现的方法
	public function getJWTCustomClaims()
	{
		return [];
	}
}